<html>
    <head>
        <title>Login to BuzzPulse</title>
        <link type="text/css" rel="stylesheet" href="CSS/login.css"/>
        <script type="text/javascript" src="JS/jquery-1.10.2.min.js"></script>
        <script type="text/javascript" src="JS/soapclient.js"></script>
        <script type="text/javascript">
            function getlogin() {
                var pl = new SOAPClientParameters();
                pl.add("typedata", "login");
                pl.add("email", document.login.username.value);
                pl.add("password", document.login.password.value);
                SOAPClient.invoke("http://localhost/buzzPulse/m/", "getLogin", pl, true, login);
            }
            
            function login(r) {
                console.log(r);
                if(r["email"] != "")
                    window.location.reload(true);
            }
        </script>
    </head>
    <body>
        <div class="login-container">
            <a href="#" class="logo">
                <img class="logoimage" src="Images/logo.png" witdh="250px"/>
            </a>
            <form name="login" action="" method="POST" onsubmit="getlogin(); return false;">
                <label>Your Username or Email:</label>
                <input type="text" placeholder="Your Username or Email" name="username" id="id_username">
                <label>Your Password:</label>
                <input type="password" placeholder="Your Password" name="password" id="id_password">
                <div class="btn-holder"><input type="submit" class="btn btn-red" value="Log me in"></div>       
                <a class="forgot-password-link" href="/front/account/forgot_password/">I forgot my password</a>
            </form>
        </div>
    </body>
</html>

